<?php

/**
 * This is the model class for table "jumlahulama".
 *
 * The followings are the available columns in table 'jumlahulama':
 * @property integer $ju_id
 * @property integer $ju_kec
 * @property integer $ju_ulama
 * @property integer $ju_mubaligh
 * @property integer $ju_khotib
 * @property integer $ju_penyuluh
 * @property integer $ju_penyuluh_honor
 * @property integer $ju_tahun
 */
class Jumlahulama extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Jumlahulama the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'jumlahulama';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('ju_kec, ju_ulama, ju_mubaligh, ju_khotib, ju_penyuluh, ju_penyuluh_honor, ju_tahun', 'numerical', 'integerOnly'=>true),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('ju_id, ju_kec, ju_ulama, ju_mubaligh, ju_khotib, ju_penyuluh, ju_penyuluh_honor, ju_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'ju_id' => 'Ju',
			'ju_kec' => 'Kecamatan',
			'ju_ulama' => 'Ulama',
			'ju_mubaligh' => 'Mubaligh',
			'ju_khotib' => 'Khotib',
			'ju_penyuluh' => 'Penyuluh',
			'ju_penyuluh_honor' => 'Penyuluh Honor',
			'ju_tahun' => 'Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('ju_id',$this->ju_id);
		$criteria->compare('ju_kec',$this->ju_kec);
		$criteria->compare('ju_ulama',$this->ju_ulama);
		$criteria->compare('ju_mubaligh',$this->ju_mubaligh);
		$criteria->compare('ju_khotib',$this->ju_khotib);
		$criteria->compare('ju_penyuluh',$this->ju_penyuluh);
		$criteria->compare('ju_penyuluh_honor',$this->ju_penyuluh_honor);
		$criteria->compare('ju_tahun',$this->ju_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}